<?php
function My(){
	require 'control.php';
	$my_con=mysql_connect(C('DB_HOST').":".C('DB_PORT'),C('DB_USER'),C('DB_PWD'));
	if(!$my_con){
		die('无法连接'.mysql_error());
	}
	echo '连接成功';
	mysql_close($my_con);
}
function MyPdo(){
	require 'control.php';
	$dsn="mysql:dbname=".C('DB_NAME').";host=".C('DB_HOST');
	$username=C('DB_USER');
	$passwd=C('DB_PWD');
	try {
		$my_con= new PDO($dsn, $username, $passwd);
	} catch (PDOException $e) {
		echo '连接失败'.$e->getmessage();
	}
}function Ms() {
	require 'control.php';
	$dsn=D('DB_S');
	$user=D('DB_USER');
	$password=D('DB_PWD');
	$my_con=odbc_connect($dsn, $user, $password) or die("无法连接");
}
?>